<!DOCTYPE html>
<html lang="en">

<head>
    <link rel="dns-prefetch" href="//cdn.bootcdn.net"/>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>延迟加载</title>
    <link rel="stylesheet" href="./style.css">
    
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.min.js" defer></script>
    <script src="./index.js" type="module" defer></script>
</head>

<body>
    <div class="container">
        <div class="comp" v-for="i in 20" v-if="defer(i)">
            <div class="dot" v-for="n in 5000"></div>
        </div>
    </div>
</body>

</html>